#!/bin/bash

set -e

#DEBHELPER#

case "$1" in
    configure)
        # inital setup
        /usr/share/zentyal/initial-setup --no-restart network $2

        # restart module
        zs network restart || true

        # restart trafficshaping, ignore error if not exists
        # this is regenerate mangle rules after the flush in network restart
        zs trafficshaping restart >/dev/null 2>&1 || true

        dpkg-trigger --no-await zentyal-core
    ;;
esac

exit 0
